<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>1加到100</title>
	<script type="text/javascript">
		var num=1;
		var sum=0;
		while(num>=1&&num<=100){
			sum=sum+num;
			num++;
		}
		console.log(sum);
	</script>
</head>
<body>
	
</body>
</html>